Skip to content

Instantly share code, notes, and snippets.

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@vialuch
vialuch / chatgpt-dynamic-status-bar-tutorial.md
Last active July 20, 2026 19:08
ChatGPT动态状态栏教程

在 ChatGPT 对话里做一个动态状态栏

通用教程与实现思路。作者:Dan & Joy

效果思路很简单:让模型调用一个只读 MCP 工具,工具返回 mood / place / focus / note 等结构化数据;ChatGPT 再把这份数据交给一个内嵌 HTML 组件。组件可以用 CSS 做动画,用 JavaScript 更新时间、展开面板和处理点击,也可以把用户刚刚操作后的状态带到下一轮对话。

它不是修改 ChatGPT 原生界面,也不是普通 Markdown 图片,而是一个运行在对话消息里的 MCP Apps 组件(iframe)。示例字段和文案都只是占位,每个人都可以按照自己的角色、项目或使用场景替换。

1. 架构

#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"
export CUDA_MALLOC_ASYNC_SUPPORTED=1
export GGML_CUDA_FORCE_MMQ=1
IMAGE="${IMAGE:-llama-turboquant:cuda}"
HOST_PORT="${HOST_PORT:-8080}"
NETWORK="${NETWORK:-runner-network}"
@gvoze32
gvoze32 / ffmpeg mp3 to mp4.MD
Last active July 20, 2026 19:02
Convert mp3 audio to MP4 using ffmpeg in terminal.

To convert audio mp3 to MP4 by ffmpeg, use the following command

ffmpeg -f lavfi -i color=c=black:s=1280x720:r=5 -i audio.mp3 -crf 0 -c:a copy -shortest output.mp4

Description

This generates mp4 formatted video with blank black background with the color source filter instead of using an image.

Since it is just black video this is one case with lossless mode (-crf 0) will have a smaller file size than the default lossy mode.

@leonid-ed
leonid-ed / udp_to_local.c
Last active July 20, 2026 19:02
Examples of using raw sockets (c, linux, raw socket)
/*
An example of using raw sockets.
You can capture packets by tcpdump:
tcpdump -X -s0 -i lo -p udp
*/
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
@rex
rex / favorite-libraries.md
Last active July 20, 2026 19:01
A list of my favorite libraries, grouped for sanity
@rex
rex / loading_messages.json
Created January 2, 2019 17:56
Funny loading messages
[
"swapping space and time",
"downloading golf balls",
"warming up reactor",
"reticulating splines",
"searching for the answer to life, the universe, and everything",
"counting backwards from infinity",
"pay no attention to the man behind the curtain",
"Calculating gravitational constant in your bay",
"following the white rabbit",
@rex
rex / css-reloader.js
Created June 12, 2019 16:23
A handy script to aid in UI development; reloads only CSS without reloading the entire page.
window.css_refresh_index = 0;
const begin = () => {
var nodes = document.querySelectorAll('link');
[].forEach.call(nodes, function (node) {
node.href += '?___ref=0';
});
}
const refresh = () => {
if (!window.css_refresh_index) {
@rex
rex / AGENTS.md
Last active July 20, 2026 18:54
Utility prompts for AI agents to perform various commonplace tasks inside a codebase

Role: You are an expert AI-assisted software engineer. Your task is to analyze a given codebase and generate a set of robust, best-practice AGENTS.md files to help other AI coding agents understand and contribute to this project effectively.

Objective: Create one AGENTS.md file at the project root and, where appropriate, additional AGENTS.md files in key subdirectories (like packages in a monorepo or distinct modules like /frontend and /api). These files will serve as the primary instruction set for AI agents.

Process:

  1. Analyze Codebase Structure:

    • Scan the entire file tree to identify the project's overall architecture.
  • Identify the primary package.json, pyproject.toml, go.mod, pom.xml, build.gradle, requirements.txt, or similar dependency/build file to understand the project's main language, framework, and build system.